package com.example.testdemo.demos.web.controller;

import com.example.hellostarter.service.HelloService;
import com.example.testdemo.demos.web.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

/**
 * @ClassName: TestControll
 * @Description:
 * @Date 2024/04/01 11:30
 * @Author songshaoqiu
 **/
@RestController
public class TestControll {
    @Autowired
    HelloService helloService;

    @GetMapping("/data")
    public String testData( User user){
        System.out.println(user);
        return "操作成功";
    }

    @GetMapping("/test")
    public String test11(){
        String str = helloService.sayHello("张飞");
        return str;
    }
}
